/**
 * @Description CustomerGrowthServiceImpl.java
 * @author xu_cc [18724000100@163.com]
 * @date 创建时间：2018年1月6日 下午5:45:04
 */
package com.solution.admin.report.service.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import com.solution.admin.report.dao.CustomerGrowthDao;
import com.solution.admin.report.service.CustomerGrowthService;
import com.solution.common.dao.BaseDao;
import com.solution.common.entity.BaseEntity;
import com.solution.common.service.impl.BaseServiceImpl;

/**
 * 
 * @author xu_cc
 * @date 创建时间：2018年1月6日 下午5:45:23
 */
@Service
public class CustomerGrowthServiceImpl extends BaseServiceImpl<BaseEntity> implements CustomerGrowthService {

	@Autowired
	CustomerGrowthDao customerGrowthDao;

	@Override
	protected BaseDao<BaseEntity> getDao() {
		return customerGrowthDao;
	}

	public Integer getCustomerCountByDate(String beginTime, String endTime) {
		Map<String, Object> param = new HashMap<String, Object>();
		param.put("beginTime", beginTime);
		param.put("endTime", endTime);
		return customerGrowthDao.getCustomerCountByDate(param);
	}

	public Integer getCustomerTotal(String endTime) {
		Map<String, Object> param = new HashMap<String, Object>();
		param.put("endTime", endTime);
		return customerGrowthDao.getCustomerTotal(param);
	}
}
